package com.design.cjm.structural.composite.example;

/**
 * @Author: Jie Ming Chen
 * @Date: 2018/9/24
 * @Version 1.0
 */
public class Leaf extends Component{

    public Leaf(String name) {
        super(name);
    }

    @Override
    public void add(Component c) {

        System.out.println("叶子节点不能添加");
    }

    @Override
    public void remove(Component c) {

        System.out.println("叶子节点不能移除");
    }

    @Override
    public void display(int depth) {

        System.out.println("叶子节点不能显示");
    }
}
